package leetcode.code036;

import leetcode.IDebug;
import leetcode.helper.HelpDebug;

public abstract class Solution036 implements IDebug {

	public abstract boolean isValidSudoku(char[][] board);

	@Override
	public void debug1() {
		String str = "[[\"5\",\"3\",\".\",\".\",\"7\",\".\",\".\",\".\",\".\"]"
				+ ",[\"6\",\".\",\".\",\"1\",\"9\",\"5\",\".\",\".\",\".\"]"
				+ ",[\".\",\"9\",\"8\",\".\",\".\",\".\",\".\",\"6\",\".\"]"
				+ ",[\"8\",\".\",\".\",\".\",\"6\",\".\",\".\",\".\",\"3\"]"
				+ ",[\"4\",\".\",\".\",\"8\",\".\",\"3\",\".\",\".\",\"1\"]"
				+ ",[\"7\",\".\",\".\",\".\",\"2\",\".\",\".\",\".\",\"6\"]"
				+ ",[\".\",\"6\",\".\",\".\",\".\",\".\",\"2\",\"8\",\".\"]"
				+ ",[\".\",\".\",\".\",\"4\",\"1\",\"9\",\".\",\".\",\"5\"]"
				+ ",[\".\",\".\",\".\",\".\",\"8\",\".\",\".\",\"7\",\"9\"]]";
		boolean e = true;
		debug(str,e);

	}

	private void debug(String str, boolean e) {
		char[][] board = HelpDebug.str2array5(str);
		boolean r = this.isValidSudoku(board);
		HelpDebug.compare(e, r);
	}

	@Override
	public void debug2() {
		String str = "[[\"8\",\"3\",\".\",\".\",\"7\",\".\",\".\",\".\",\".\"]"
				+ ",[\"6\",\".\",\".\",\"1\",\"9\",\"5\",\".\",\".\",\".\"]"
				+ ",[\".\",\"9\",\"8\",\".\",\".\",\".\",\".\",\"6\",\".\"]"
				+ ",[\"8\",\".\",\".\",\".\",\"6\",\".\",\".\",\".\",\"3\"]"
				+ ",[\"4\",\".\",\".\",\"8\",\".\",\"3\",\".\",\".\",\"1\"]"
				+ ",[\"7\",\".\",\".\",\".\",\"2\",\".\",\".\",\".\",\"6\"]"
				+ ",[\".\",\"6\",\".\",\".\",\".\",\".\",\"2\",\"8\",\".\"]"
				+ ",[\".\",\".\",\".\",\"4\",\"1\",\"9\",\".\",\".\",\"5\"]"
				+ ",[\".\",\".\",\".\",\".\",\"8\",\".\",\".\",\"7\",\"9\"]]";
		boolean e = false;
		debug(str,e);

	}

	@Override
	public void debug3() {
		// TODO Auto-generated method stub

	}

	@Override
	public void debug4() {
		// TODO Auto-generated method stub

	}

}
